/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * Author: Wangyaoxi
 * Date: 2010-4-7 上午11:07:46
 */
package com.ccxe.manage.util.help;

import javax.servlet.http.HttpServletRequest;

/**
 * 路径类
 * @author wyx
 * 
 */
public class ServletHelper {

	// 获取服务基础路径
	public static String getServletUrl(HttpServletRequest request,
			String myServlet) {
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName()
				+ ":" + request.getServerPort() + path + "/";
		basePath += myServlet;
		return basePath;
	}
}
